package com.salt.modules.log.utils;

import cn.hutool.core.lang.Snowflake;
import com.salt.common.utils.SpringContextHolder;

/**
 * @Description
 * @Author salt
 * @Date 2023/4/19
 * @Version 1.0.1
 */
public class SnowflakeUtil {

    private static Snowflake snowflake = SpringContextHolder.getBean(Snowflake.class);

    public static long nextId() {
        return snowflake.nextId();
    }

    public static String nextIdStr() {
        return String.valueOf(nextId());
    }
}
